package com.twotwoshop.commom.redis;

public class RedisConstants {

    //login
    public static final String LOGIN_CODE_KEY = "login:code:";
    public static final Long LOGIN_CODE_TTL = 1L;
    public static final String LOGIN_USER_KEY = "login:token:";
    public static final Long LOGIN_USER_TTL = 30000L;

    //热点商品数据   30min
    public static final String GOODS_HOT_KEY = "twotwo:goods:hot:";
    public static final Long  GOODS_HOT_TTL = 30L;

    //最新发布商品数据
    public static final String GOODS_NEW_KEY = "twotwo:goods:new:";
    public static final Long  GOODS_NEW_TTL = 30L;

    //最推荐的商品数据
    public static final String GOODS_COMMENT_KEY = "twotwo:goods:comment:";
    public static final Long  GOODS_COMMENT_TTL = 30L;

    //商品详情数据
    public static final String GOODS_DETAIILS_KEY = "twotwo:goods:details:";

    public static final Long  GOODS_DETAILS_TTL = 30L;

    //商品浏览次数
    public static final String GOODS_VIEWS_KEY = "twotwo:goods:views:";

    //商品浏览历史
    public static final String GOODS_VIEWS_HISTORY_KEY = "twotwo:goods:views:history:";
    //浏览历史保存一个月
    public static final Long  GOODS_VIEWS_HISTORY_TTL = 30000L;



    //商品收藏数量
    public static final String GOODS_FAVOURITE_KEY = "twotwo:goods:favourite:";

    //商品收藏历史
    public static final String GOODS_FAVOURITE_HISTORY_KEY = "twotwo:goods:favourite:history:";



    // 商品浏览量 分布式锁
    public static final String GOODS_HOT_LOCK_KEY = "twotwo:goods:hot:lock:";
    //商品收藏信息费分布式锁
    public static final String GOODS_FAVOURITE_LOCK_KEY = "twotwo:goods:favourite:lock:";
    //商品发布信息分布式锁
    public static final String GOODS_PUBLISH_LOCK_KEY = "twotwo:goods:publish:lock:";


    //订单生成分布式锁
    public static final String ORDER_LOCK_KEY = "twotwo:order:lock:";
    //订单幂等性token
    public static final String ORDER_TOKEN_KEY = "twotwo:order:token:";




    //用户关注卖家
    public static final String USER_FOLLOW_KEY = "twotwo:user:follow:";

    //卖家的粉丝
    public static final String USER_FAN_KEY = "twotwo:user:fan:";

    //Order的全局id
    public static final String CACHE_ORDER_ID = "twotwo:order:icr:";




    /**
     * 用户注册锁，Key Prefix + 用户名
     */
    public static final String LOCK_USER_REGISTER = "index12306-user-service:lock:user-register:";

    /**
     * 用户注销锁，Key Prefix + 用户名
     */
    public static final String USER_DELETION = "index12306-user-service:user-deletion:";

    /**
     * 用户注册可复用用户名分片，Key Prefix + Idx
     */
    public static final String USER_REGISTER_REUSE_SHARDING = "index12306-user-service:user-reuse:";

    /**
     * 用户乘车人列表，Key Prefix + 用户名
     */
    public static final String USER_PASSENGER_LIST = "index12306-user-service:user-passenger-list:";















    //shop
    public static final Long CACHE_SHOP_TTL = 30L;
    public static final String CACHE_SHOP_KEY = "cache:shop:";

    //shopType
    public static final String CACHE_SHOPTYPE_KEY = "cache:shoptype:";
    public static final Long CACHE_SHOPTYPE_TTL = 30L;


    public static final String LOCK_SHOP_KEY = "lock:shop:";
    public static final Long LOCK_SHOP_TTL = 10L;

    //秒杀优惠券库存
    public static final String SECKILL_STOCK_KEY = "seckill:stock:";
    //文章点赞
    public static final String BLOG_LIKED_KEY = "blog:liked:";
    //关注用户
    public static final String FOLLOWS_KEY = "follows:";

    //粉丝收件箱
    public static final String FEED_KEY = "feed:";
    public static final String SHOP_GEO_KEY = "shop:geo:";
    //签到
    public static final String USER_SIGN_KEY = "sign:";
}
